home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / Metafont / Inputs / cm / italp.mf < prev    next >
Text File  |  1996-03-25  |  5KB  |  98 lines

  1. % This file contains `\$' and `\&' and `?' in the so-called italic style.
  2.  
  3. % Codes \0044, \0046, and \0077 are generated, as well as code |spanish_query|
  4. % (for a Spanish question mark) if that code value is known.
  5.  
  6. cmchar "Sterling sign";
  7. beginchar("$",12u#,asc_height#,0);
  8. adjust_fit(0,.75asc_height#*slant-.5u#); pickup fine.nib;
  9. pos0(flare,0); pos1(hair,0); pos2(vair,90); pos3(stem,180);
  10. pos4(stem,180); pos4'(stem,0); pos5(vair,-90); z4'=z4;
  11. x2=2/3w-.5u; rt x3l=rt x4l=hround(.5w-u+.5stem); x5=2.5u;
  12. y1=y3=.75h; top y2=h+oo; y4=.25h; bot y5r=-oo;
  13. rt x1r=hround(w-1.5u); bulb(2,1,0);  % bulb
  14. filldraw stroke pulled_arc.e(2,3)..z4e;  % stem
  15. numeric light_stem; light_stem=2/3[vair,vstem];
  16. pos6(.5[hair,light_stem],-180); pos7(light_stem,-300);
  17. pos8(light_stem,-300); pos9(hair,-180);
  18. lft x6r=hround u; x7=3u; x8=w-3.5u; rt x9l=hround(w-u);
  19. y6=.4[y5,y7]; top y7r=vround .2h; bot y8l=-oo; y9=good.y .2h;
  20. filldraw stroke pulled_arc.e(4',5)...z6e{up}...z7e{right}
  21.  ..{right}z8e...{up}z9e;  % loop and arm
  22. pos10(bar,90); pos11(bar,90); x10=3u; x11=w-4.5u;
  23. top y10r=top y11r=vround(.5h+.5bar); filldraw stroke z10e--z11e;  % bar
  24. penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;
  25.  
  26. cmchar "Italic ampersand";
  27. beginchar("&",14u#,asc_height#,0);
  28. italcorr asc_height#*slant-1.5u#;
  29. adjust_fit(if monospace:-u#,-2u# else: 0,0 fi); pickup fine.nib;
  30. pos1(flare,0); pos2(hair,0); pos3(vair,90);
  31. rt x2r=hround.5w; x3=1/3(w-u);
  32. top y3r=h+o; y2=.5[x_height,h]; bulb(3,2,1);  % left bulb
  33. pos4(stem,180); pos5(vair,270); pos6(hair,360); pos7(vair,450);
  34. pos8(curve,540); pos9(vair,630); pos10(hair,720);
  35. lft x4r=hround 1.25u; x5=x7=x3+1/6u; rt x6r=hround(x5+1.5u);
  36. lft x8r=hround u; x9=.5w; rt x10r=hround(w-1.5u);
  37. y4=.5[y3,y5]; top y5l=vround .77x_height; y6=.5[y5,y7];
  38. y7l=good.y 1/3[y5,y3]; y8=.5[y7,y9]; bot y9r=-o; y10=bar_height;
  39. pos12(hair,0); pos13(curve,0); pos14(hair,0); pos15(vair,90); pos16(curve,90);
  40. rt x12r=rt x13r=hround(w-2u); lft x14l=hround(.5w+.5u);
  41. x15=x16=rt x14r+u;
  42. y12=y13=h-.5curve; y14=.5[bar_height,x_height];
  43. bot y15l=bot y16l=vround y10;
  44. numeric theta; theta=angle((z12-z14)xscaled 2);
  45. pos11(hair,theta); x11=w-4u; y11=.5[y13,y16];
  46. filldraw stroke pulled_arc.e(3,4) & pulled_arc.e(4,5) & pulled_arc.e(5,6)
  47.  & pulled_arc.e(6,7) & pulled_arc.e(7,8) & pulled_arc.e(8,9)
  48.  & {{interim superness:=more_super; pulled_arc.e(9,10)}}
  49.  ..tension .9 and 1..{dir(theta+100)}z11e;  % bowls, loop, and stem
  50. pos11'(hair,theta-90); z11'=z11;
  51. forsuffixes $=l,r: path p$;
  52.  p$=z12${down}..z11'${-dir theta}..{down}z14$...{right}z15$; endfor
  53. filldraw p.l--reverse p.r--cycle;  % arms
  54. path q[]; q1=z13r{up}..z13l{down}..cycle;
  55. q2=z16l{right}..z16r{left}..cycle;
  56. filldraw subpath(0,ypart(p.l intersectiontimes q1)) of q1--cycle; % upper bulb
  57. filldraw subpath(0,ypart(p.r intersectiontimes q2)) of q2--cycle; % lower bulb
  58. penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar;
  59.  
  60. cmchar "Italic question mark";
  61. beginchar("?",9u#,asc_height#,0);
  62. italcorr asc_height#*slant-u#;
  63. adjust_fit(0,0); pickup tiny.nib; pos10(dot_size,0); pos11(dot_size,90);
  64. lft x10l=hround(.5w-.5dot_size); bot y11l=0; z10=z11; dot(10,11);  % dot
  65. pickup fine.nib; pos1(flare,180); pos2(hair,180); pos3(vair,90);
  66. lft x1r=hround u; x3=.5w;
  67. y1-.5flare=x_height; top y3r=h+o; bulb(3,2,1); % bulb
  68. pos8(vair,-90); x8=.5w; bot y8r=.25[top y11r,x_height]+1;
  69. numeric theta; theta=90+angle(10u,y3-y8); slope:=(y3-y8)/10u;
  70. pos3'(vair,-90); z3'=z3; pos0(vstem,theta); x0=x3; y0=1/3[y8,y3];
  71. rt x4l=hround(w-1.5u); lft x7r=hround 1/3w;
  72. x4l-x4r=x7l-x7r=hround .5[vair,vstem]-fine;
  73. ellipse_set(3'l,4l,5l,0l); ellipse_set(3'r,4r,5r,0r); y4=y4r;
  74. ellipse_set(8l,7l,6l,0l); ellipse_set(8r,7r,6r,0r); y7=y7r;
  75. pos9(hair,0); rt x9r=hround(2/3w+.5hair); y9=good.y .5[y8,y0];
  76. filldraw stroke super_arc.e(3',4) & z4e{down}
  77.  ..z5e---z6e..z7e{down} & super_arc.e(7,8)...{up}z9e;  % main stroke
  78. penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
  79.  
  80. iff known spanish_query: cmchar "Spanish open italic question mark";
  81. beginchar(spanish_query,9u#,asc_height#-desc_depth#,desc_depth#);
  82. adjust_fit(0,0); pickup tiny.nib; pos10(dot_size,0); pos11(dot_size,90);
  83. lft x10l=hround(.5w-.5dot_size); top y11r=h; z10=z11; dot(10,11);  % dot
  84. pickup fine.nib; pos1(flare,0); pos2(hair,0); pos3(vair,-90);
  85. rt x1r=hround(w-u); x3=.5w; y1+.5flare=asc_height-x_height-d;
  86. bot y3r=-d-o; bulb(3,2,1); % bulb
  87. pos8(vair,90); x8=.5w; top y8r=.25[bot y11l,y1+.5flare]-1;
  88. numeric theta; theta=angle(10u,y8-y3)-90; slope:=(y8-y3)/10u;
  89. pos3'(vair,90); z3'=z3; pos0(vstem,theta); x0=x3; y0=1/3[y8,y3];
  90. lft x4l=hround 1.5u; rt x7r=hround 2/3w;
  91. x4r-x4l=x7r-x7l=hround .5[vair,vstem]-fine;
  92. ellipse_set(3'l,4l,5l,0l); ellipse_set(3'r,4r,5r,0r); y4=y4r;
  93. ellipse_set(8l,7l,6l,0l); ellipse_set(8r,7r,6r,0r); y7=y7r;
  94. pos9(hair,180); lft x9r=hround(1/3w-.5hair); y9=good.y .5[y8,y0];
  95. filldraw stroke super_arc.e(3',4) & z4e{up}
  96.  ..z5e---z6e..z7e{up} & super_arc.e(7,8)...{down}z9e;  % main stroke
  97. penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
  98.